<!DOCTYPE html>
<html lang="en">
<HEAD><TITLE>云和租房 - 用户注册</TITLE>
    <META content="text/html; charset=utf-8" http-equiv=Content-Type>
    <LINK
            rel=stylesheet type=text/css href="css/css/style.css">
    <META name=GENERATOR content="MSHTML 8.00.7601.17514">
    <link rel="stylesheet" href="css/layer/theme/default/layer.css">
    <link rel="stylesheet" href="css/layer/mobile/need/layer.css">
    <script type="text/javascript" src="css/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="css/js/jquery.validate.js"></script>
    <script type="text/javascript" src="css/js/messages_zh.js"></script>
    <script type="text/javascript" src="css/layer/layer.js"></script>
    <script type="text/javascript" src="css/js/gVerify.js"></script>
</HEAD>
<script type="text/javascript">
    $(function () {
        //将动态生成的验证码放在哪里
        var verifyCode = new GVerify("v_container");
        $("#yz").blur(function () {
            //获取输入框内的值
            var value=$(this).val();
            //判断你输入的和生成的验证码是否一致
            var res = verifyCode.validate(value);  //res--boolean

            if (res){
                alert("验证码正确")
                return true;
            }else{
                if(value == ""){
                    alert("请输入验证码")
                }else{
                    alert("验证码错误")
                }
                return false;
            }

        })




        var exp=/^[0-9]{6,10}$/;
        var flag=false;
        $("#name").blur(function () {
            var res=$(this).val();

            if(!exp.test(res)){
                //输入的不对
                alert("账号只能是数字，且是6-10位");
                flag=false;
            }else{
                flag=true;
            }
        })

        var exc=/^(?!([a-zA-Z]+|\d+)$)[a-zA-Z\d]{6,20}$/;
        var flag=false;
        $("#password").blur(function(){
            //获得输入的内容
            var res=$(this).val();

            if(!exc.test(res)){
                //输入的不对
                alert("密码输入不符合要求，请重新输入");
                flag=false;
            }else{
                flag=true;
            }
        })
        $("#repassword").blur(function(){
            var res=$(this).val();
            var res1=$("#password").val();
            if(res!=res1){
                alert("两次输入密码不符，请重新输入");
                flag=false;
            }else{
                flag=true;
            }
        })
        $("#myForm").submit(function () {
            if(!flag){
                alert("数据数据还不对呢！");
                return false;
            }
        });
        })


</script>
<BODY>
<DIV id=header class=wrap>
    <DIV id=logo><IMG src="css/images/logo.gif"></DIV>
</DIV>
<DIV id=regLogin class=wrap>
    <DIV class=dialog>
        <DL class=clearfix>
            <DT>新用户注册</DT>
            <DD class=past>填写个人信息</DD>
        </DL>
        <DIV class=box>
            <FORM action="insertPeople" method="post">
                <DIV class=infos>
                    <TABLE class=field>
                        <TBODY>

                        <input type="text" style="display: none" name="state" value="0"/>
                        <TR>
                            <TD class=field>用 户 名：</TD>
                            <TD><INPUT class=text type="text" name="pid" id="name" placeholder="输入用户名"><span
                                    id="yzname"></span></TD>
                        </TR>

                        <TR>
                            <TD class=field>密　　码：</TD>
                            <TD><INPUT class=text type="password" name="ppass" id="password" placeholder="输入密码"><span
                                    id="yzpass"></span></TD>
                        </TR>
                        <TR>
                            <TD class=field>确认密码：</TD>
                            <TD><INPUT class=text type="password"  id="repassword" placeholder="确认密码"><span
                                    id="yzrepass"></span></TD>
                        </TR>

                        <TR>
                            <TD class=field>验证码：</TD>
                            <TD><INPUT class="yanzheng" type="text"  id="yz" placeholder="验证码"/></TD>
                            <div id="v_container"  class="validation_img" style="width: 100px;height: 30px; float: right;margin-right: 100px;position: absolute;top: 345px;right: 430px"></div>
                        </TR>

                        </TBODY>

                    </TABLE>
                    <DIV class=buttons>
                        <input id="myForm" type="submit" value="注册" class="submit"/>
                    </DIV>

                </DIV>
            </FORM>
        </DIV>
    </DIV>
</DIV>
<DIV id=footer class=wrap>
    <DL>
        <DT>云和租房 © 2010 云和 京ICP证1000001号</DT>
        <DD>关于我们 · 联系方式 · 意见反馈 · 帮助中心</DD>
    </DL>
</DIV>
</BODY>
<script>
</script>


</HTML>